#include <iostream>
#include <vector>

using namespace std;

vector<int> mul(vector<int> &A, int B)
{
    vector<int> c;

    int t = 0;
    int i;
    for(i = 0; i < A.size() || t; i++)
    {
        if(i < A.size()) t += A[i] * B;
        c.push_back(t % 10);
        t /= 10;
    }
    while(c.size() > 1 && c.back() == 0) c.pop_back();
    return c;
}
int main()
{
    string a;
    int B;
    cin >> a >> B;

    vector<int> A;
    int i;
    for(i = a.size() - 1; i >= 0; i--) A.push_back(a[i] - '0');

    auto c = mul(A, B);

    for(i = c.size() - 1; i >= 0; i--) printf("%d", c[i]);


    return 0;
}
